package com.learn.bus.data;

import com.learn.bus.AbstractData;
import com.learn.bus.Data;

/**
 * <p>项目名称: design-pattern </p>
 *
 * <p>文件名称: MessageData </p>
 *
 * An event raised when a string message is sent.
 */
public class MessageData extends AbstractData {

    private final String message;

    public MessageData(String message) {
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public static Data of(String message){
        return new MessageData(message);
    }
}
